<?php
include '../../../wp-blog-header.php';
$deal_details = decrypt($_GET['t'],'1b2u3z4z5r6');
$deal_details = explode('~',$deal_details);


$deal_name = $deal_details[0];
$deal_link = $deal_details[1];
$ext_link = $deal_details[2];
$coupon_code = $deal_details[3];
$details = strip_tags($deal_details[4]);
$terms = $deal_details[5];
$end_date = $deal_details[6];
$end_date = time_till_expires($end_date); 
$brand_name = $deal_details[7];
$brand_logo = $deal_details[8];
$address = $deal_details[9];
$brand_loc = $deal_details[10];
?>
<html>
<head>
<title>Coupon</title>
<link rel="stylesheet" href="<?php echo BUZZR_THEME_URL.'/css/coupon.css'; ?>">

</head>
<body>
  <div style="background:darkred;width:350px;border:3px dashed lightBlue;">
  <div id="non-printable"><div class="couponwindow" style="border:none;"><h1><?php echo $deal_name; ?></h1>Coupon Code: <div class="couponcode"><?php echo $coupon_code; ?></div> <?php echo $end_date; ?>
  <div class="socialbuttons"><div class="facebooksharebutton"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo $deal_link; ?>&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px;"></iframe></div>
  <div class="emailto"><a href="mailto:?body=<?php echo $details; ?>%0ACheck%20out%20the%20offer%20at%20http%3A%2F%2Fbuzzr.in%2Fdeals%2F<?php echo $deal_link; ?>&amp;subject=<?php echo $deal_name; ?>"><img src="<?php echo BUZZR_WP_URL; ?>/wp-content/uploads/2010/07/email_icon.png" width="25" height="25" title="Quick! Email a friend!" /></a></div>
  <div class="retweetbutton"><a href="http://twitter.com/home/?status=<?php echo $details; ?> - <?php echo $deal_link; ?>%20via%20@BuzzrIndia"><img src="<?php echo BUZZR_WP_URL; ?>/wp-content/uploads/2009/11/twittericon.png" width="25" height="25"></a></div>
  <div class="retweetbutton"><a href="javascript:print(document)"><img src="<?php echo BUZZR_WP_URL; ?>/wp-content/pfiles/images/print_icon.gif"  title="print this page"></a></div></div>
<?php
$message = "Message from Buzzr.in. ".$deal_name." Your coupon code is ".$coupon_code." Check out http://buzzr.in/deals to get some more exciting offers.";
?>
<div class="title">Send To Mobile:</div><div class="mobile"><form id="smsform" class="appnitro"  method="post" action="<?php echo BUZZR_URL; ?>/form" target="_blank"><input type="hidden" value="<?php echo $message; ?>" name="message" /><label class="description" for="cell">Mobile Number Eg:(91xxxxxxxxxx) </label><input id="cell" name="cell" class="element text medium" type="text" maxlength="255" value=""/> <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" /><input type="hidden" value="<?php echo $message; ?>" name="message" /></form></div>
</div></div></div>
<div id="printable" style="background:pink;"><br><img src="<?php echo BUZZR_WP_URL; ?>/wp-content/uploads/2010/04/buzzrlogo.gif" />&nbsp;&nbsp;
<br><center><h1><?php echo $deal_name; ?></h1></center><br>
<center>Your coupon code is: <p style="color:sienna"><h2><?php echo $coupon_code; ?></h2></p></center><br>
<center><br>This Deal is sponsored by <h3><?php echo $brand_name; ?></h3><img src="<?php echo $brand_logo; ?>"  width="50" height="50"/></center><br><br>
<?php echo $details; ?><br>
<i>Offer valid only until <?php echo $end_date; ?> <?php echo "\.".$terms; ?></i> <br><br>For more deals and discount visit <strong>Buzzr.In</strong><br><br>
<?php echo $brand_loc.'/'.$address; ?></div></div>
</body>
</html>